var Greektube = new Object();
Greektube.rev                = 1;
Greektube.SearchDesc         = 'Search on Greektube';
Greektube.Name               = 'Greektube';
Greektube.Search             = function (keyword, page){
  var result = new Object();
  result.bypage            = 20;
  result.start             = (page-1)*result.bypage+1;
  start = page*20-20;
  c = GetContents('http://www.greektube.org/index.php?option=com_search&searchword='+escape(keyword)+'&searchphrase=any&ordering=newest&limit=20&limitstart='+start);
  result.total             = -1;
  result.VideoInfo = new Array();
  while (p = c.indexOf('<table width="640" height="101" border="0" class="contentpaneopen" >',p)+1){
    video = new Object();
    video.attr               = 3;
    video.page               = 'http://www.greektube.org/'+ext('href="');
	video.Id                 = ext('src="','.jpg');
	video.ThumbnailURL       = 'http://www.greektube.org'+video.Id+'.jpg';
	video.URL                = 'http://videos.greektube.org'+video.Id+'.flv';
	video.Title              = ext('border="0" />','</a>');
    video.SaveFilename       = video.Title+'.flv';
    result.VideoInfo.push(video);
  }
  result.end               = result.start-1+result.VideoInfo.length;
  return result;
}
SiteList.push(Greektube);